#include <iostream>
using namespace std;

int main()
{
	int t,n;
	int f1=1;
	int f2=1;
	int f3;
	cin>>t;
	while(t--)
	{
		f1=1;
		f2=1;
		cin>>n;
		if(1==n)
			cout<<1<<endl;
		else if(2==n)
			cout<<1<<endl;
		else
		{
			for(int i=3;i<=n;i++)
			{
				f3=f1+f2;
				f1=f2;
				f2=f3;
			}
			cout<<f2<<endl;
		}
	}
	getchar();
	getchar();
	return 0;
}